<template>
	<view class="clock">
		<template v-if="clockList.length ===0">
			<view>
				<notFoundData />
			</view>
		</template>
		<template v-for="item in clockList">
			<view class="clockItem" :key="item.id">
				<uni-collapse ref="collapse">
					<uni-collapse-item>
						<template v-slot:title>
							<view class="card">
								<view class="header">
									<view class="name">{{item.admin_name}}</view>
									<view class="day">{{item.type}}</view>
								</view>
								<view class="body">
									{{item.date}}
								</view>
							</view>
						</template>
						<uni-section title="项目" :sub-title="item.project_name"></uni-section>
						<uni-section title="地区" :sub-title="item.location"></uni-section>
						<uni-section title="状态"
							:sub-title="Number(item.admin_approved)===0 ?'未审核' :(Number(item.admin_approved)===1 ?'已审核':'已反驳')">
						</uni-section>
						<template>
							<view>
								<uni-section title="平方米" :sub-title="item.square_meter"></uni-section>
							</view>
							<view>
								<uni-section title="工时" :sub-title="item.days"></uni-section>
							</view>
						</template>

					</uni-collapse-item>
				</uni-collapse>
			</view>



		</template>
	</view>
</template>

<script>
	import {
		mapGetters
	} from "vuex";
	import notFoundData from '@/components/notFoundData/index.vue'
	export default {
		props: {
			clockList: {
				type: Array,
				default () {
					return []
				}
			}
		},
		components: {
			notFoundData
		},
		data() {
			return {

			}
		},
		methods: {

		},
		created() {

		}
	}
</script>

<style lang="less" scoped>
	.clock {
		background-color: #fdfdfd;
		height: auto;
		min-height: 100%;
		padding-bottom: 20rpx;

		.clockItem {
			padding: 25rpx 35rpx;
		}

		.card {
			padding: 10rpx 20rpx;

			.header {
				width: 100%;
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 20rpx;

				.day {
					font-size: 25rpx;
					color: #929499;
				}

				.name {
					font-size: 35rpx;
					font-weight: 500;
					color: #3d3d43;
				}
			}

			.body {
				color: #929499;
				font-size: 25rpx;
			}
		}
	}
</style>
